package SpringIOC.impl;

import SpringIOC.Person;

import java.util.List;

public class Chinese implements Person {
    String name;
    List wifes;
    Wife wife;
    List<Wife> wifeList;     //setter注入

    public List<Wife> getWifeList() {
        return wifeList;
    }

    public void setWifeList(List<Wife> wifeList) {
        this.wifeList = wifeList;
    }

    @Override
    public void eat() {
        System.out.println("吃饼干");
    }

    public Chinese(String name, List wifes) {
        this.name = name;
        this.wifes = wifes;
    }

    public Chinese(String name) {
        this.name = name;
    }

    public Chinese(String name, Wife wife) {
        this.name = name;
        this.wife = wife;
    }

    @Override
    public String toString() {
        return "Chinese{" +
                "name='" + name + '\'' +
                ", wifes=" + wifes +
                ", wife=" + wife +
                ", wifeList=" + wifeList +
                '}';
    }
}
